from pathlib import Path
from typing import Any

from pptx.util import Inches


def render(slide, shape, path: Any):
    p = Path(str(path))
    if not p.exists():
        return False
    left = shape.left
    top = shape.top
    width = shape.width
    height = shape.height
    pic = slide.shapes.add_picture(str(p), left, top, width=width, height=height)
    shape._element.getparent().remove(shape._element)
    return True